3.25 \(\int (d+e x) (a+b \tanh ^{-1}(c x^2)) \, dx\)

Optimal. Leaf size=117 \[ \frac {(d+e x)^2 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )}{2 e}+\frac {b \left (c d^2+e^2\right ) \log \left (1-c x^2\right )}{4 c e}-\frac {b \left (c d^2-e^2\right ) \log \left (c x^2+1\right )}{4 c e}+\frac {b d \tan ^{-1}\left (\sqrt {c} x\right )}{\sqrt {c}}-\frac {b d \tanh ^{-1}\left (\sqrt {c} x\right )}{\sqrt {c}} \]

[Out]

1/2*(e*x+d)^2*(a+b*arctanh(c*x^2))/e+1/4*b*(c*d^2+e^2)*ln(-c*x^2+1)/c/e-1/4*b*(c*d^2-e^2)*ln(c*x^2+1)/c/e+b*d*
arctan(x*c^(1/2))/c^(1/2)-b*d*arctanh(x*c^(1/2))/c^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 94, normalized size of antiderivative = 0.80, number of steps used = 10, number of rules used = 7, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.438, Rules used = {6742, 6091, 298, 203, 206, 6097, 260} \[ \frac {a (d+e x)^2}{2 e}+\frac {b e \log \left (1-c^2 x^4\right )}{4 c}+b d x \tanh ^{-1}\left (c x^2\right )+\frac {b d \tan ^{-1}\left (\sqrt {c} x\right )}{\sqrt {c}}-\frac {b d \tanh ^{-1}\left (\sqrt {c} x\right )}{\sqrt {c}}+\frac {1}{2} b e x^2 \tanh ^{-1}\left (c x^2\right ) \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x)*(a + b*ArcTanh[c*x^2]),x]

[Out]

(a*(d + e*x)^2)/(2*e) + (b*d*ArcTan[Sqrt[c]*x])/Sqrt[c] - (b*d*ArcTanh[Sqrt[c]*x])/Sqrt[c] + b*d*x*ArcTanh[c*x
^2] + (b*e*x^2*ArcTanh[c*x^2])/2 + (b*e*Log[1 - c^2*x^4])/(4*c)

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 298

Int[(x_)^2/((a_) + (b_.)*(x_)^4), x_Symbol] :> With[{r = Numerator[Rt[-(a/b), 2]], s = Denominator[Rt[-(a/b),
2]]}, Dist[s/(2*b), Int[1/(r + s*x^2), x], x] - Dist[s/(2*b), Int[1/(r - s*x^2), x], x]] /; FreeQ[{a, b}, x] &
&  !GtQ[a/b, 0]

Rule 6091

Int[ArcTanh[(c_.)*(x_)^(n_)], x_Symbol] :> Simp[x*ArcTanh[c*x^n], x] - Dist[c*n, Int[x^n/(1 - c^2*x^(2*n)), x]
, x] /; FreeQ[{c, n}, x]

Rule 6097

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcTa
nh[c*x^n]))/(d*(m + 1)), x] - Dist[(b*c*n)/(d*(m + 1)), Int[(x^(n - 1)*(d*x)^(m + 1))/(1 - c^2*x^(2*n)), x], x
] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {align*} \int (d+e x) \left (a+b \tanh ^{-1}\left (c x^2\right )\right ) \, dx &=\int \left (a (d+e x)+b (d+e x) \tanh ^{-1}\left (c x^2\right )\right ) \, dx\\ &=\frac {a (d+e x)^2}{2 e}+b \int (d+e x) \tanh ^{-1}\left (c x^2\right ) \, dx\\ &=\frac {a (d+e x)^2}{2 e}+b \int \left (d \tanh ^{-1}\left (c x^2\right )+e x \tanh ^{-1}\left (c x^2\right )\right ) \, dx\\ &=\frac {a (d+e x)^2}{2 e}+(b d) \int \tanh ^{-1}\left (c x^2\right ) \, dx+(b e) \int x \tanh ^{-1}\left (c x^2\right ) \, dx\\ &=\frac {a (d+e x)^2}{2 e}+b d x \tanh ^{-1}\left (c x^2\right )+\frac {1}{2} b e x^2 \tanh ^{-1}\left (c x^2\right )-(2 b c d) \int \frac {x^2}{1-c^2 x^4} \, dx-(b c e) \int \frac {x^3}{1-c^2 x^4} \, dx\\ &=\frac {a (d+e x)^2}{2 e}+b d x \tanh ^{-1}\left (c x^2\right )+\frac {1}{2} b e x^2 \tanh ^{-1}\left (c x^2\right )+\frac {b e \log \left (1-c^2 x^4\right )}{4 c}-(b d) \int \frac {1}{1-c x^2} \, dx+(b d) \int \frac {1}{1+c x^2} \, dx\\ &=\frac {a (d+e x)^2}{2 e}+\frac {b d \tan ^{-1}\left (\sqrt {c} x\right )}{\sqrt {c}}-\frac {b d \tanh ^{-1}\left (\sqrt {c} x\right )}{\sqrt {c}}+b d x \tanh ^{-1}\left (c x^2\right )+\frac {1}{2} b e x^2 \tanh ^{-1}\left (c x^2\right )+\frac {b e \log \left (1-c^2 x^4\right )}{4 c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 104, normalized size = 0.89 \[ a d x+\frac {1}{2} a e x^2+\frac {b e \log \left (1-c^2 x^4\right )}{4 c}+b d x \tanh ^{-1}\left (c x^2\right )+\frac {b d \left (\log \left (1-\sqrt {c} x\right )-\log \left (\sqrt {c} x+1\right )+2 \tan ^{-1}\left (\sqrt {c} x\right )\right )}{2 \sqrt {c}}+\frac {1}{2} b e x^2 \tanh ^{-1}\left (c x^2\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)*(a + b*ArcTanh[c*x^2]),x]

[Out]

a*d*x + (a*e*x^2)/2 + b*d*x*ArcTanh[c*x^2] + (b*e*x^2*ArcTanh[c*x^2])/2 + (b*d*(2*ArcTan[Sqrt[c]*x] + Log[1 -
Sqrt[c]*x] - Log[1 + Sqrt[c]*x]))/(2*Sqrt[c]) + (b*e*Log[1 - c^2*x^4])/(4*c)

________________________________________________________________________________________

fricas [A]  time = 1.34, size = 249, normalized size = 2.13 \[ \left [\frac {2 \, a c e x^{2} + 4 \, a c d x + 4 \, b \sqrt {c} d \arctan \left (\sqrt {c} x\right ) + 2 \, b \sqrt {c} d \log \left (\frac {c x^{2} - 2 \, \sqrt {c} x + 1}{c x^{2} - 1}\right ) + b e \log \left (c x^{2} + 1\right ) + b e \log \left (c x^{2} - 1\right ) + {\left (b c e x^{2} + 2 \, b c d x\right )} \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right )}{4 \, c}, \frac {2 \, a c e x^{2} + 4 \, a c d x + 4 \, b \sqrt {-c} d \arctan \left (\sqrt {-c} x\right ) - 2 \, b \sqrt {-c} d \log \left (\frac {c x^{2} - 2 \, \sqrt {-c} x - 1}{c x^{2} + 1}\right ) + b e \log \left (c x^{2} + 1\right ) + b e \log \left (c x^{2} - 1\right ) + {\left (b c e x^{2} + 2 \, b c d x\right )} \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right )}{4 \, c}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*arctanh(c*x^2)),x, algorithm="fricas")

[Out]

[1/4*(2*a*c*e*x^2 + 4*a*c*d*x + 4*b*sqrt(c)*d*arctan(sqrt(c)*x) + 2*b*sqrt(c)*d*log((c*x^2 - 2*sqrt(c)*x + 1)/
(c*x^2 - 1)) + b*e*log(c*x^2 + 1) + b*e*log(c*x^2 - 1) + (b*c*e*x^2 + 2*b*c*d*x)*log(-(c*x^2 + 1)/(c*x^2 - 1))
)/c, 1/4*(2*a*c*e*x^2 + 4*a*c*d*x + 4*b*sqrt(-c)*d*arctan(sqrt(-c)*x) - 2*b*sqrt(-c)*d*log((c*x^2 - 2*sqrt(-c)
*x - 1)/(c*x^2 + 1)) + b*e*log(c*x^2 + 1) + b*e*log(c*x^2 - 1) + (b*c*e*x^2 + 2*b*c*d*x)*log(-(c*x^2 + 1)/(c*x
^2 - 1)))/c]

________________________________________________________________________________________

giac [A]  time = 0.36, size = 143, normalized size = 1.22 \[ \frac {b d \sqrt {{\left | c \right |}} \arctan \left (x \sqrt {{\left | c \right |}}\right )}{c} - \frac {b c d \log \left ({\left | x + \frac {1}{\sqrt {{\left | c \right |}}} \right |}\right )}{2 \, {\left | c \right |}^{\frac {3}{2}}} + \frac {b d \sqrt {{\left | c \right |}} \log \left ({\left | x - \frac {1}{\sqrt {{\left | c \right |}}} \right |}\right )}{2 \, c} + \frac {b c x^{2} e \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right ) + 2 \, a c x^{2} e + 2 \, b c d x \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right ) + 4 \, a c d x + b e \log \left (c^{2} x^{4} - 1\right )}{4 \, c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*arctanh(c*x^2)),x, algorithm="giac")

[Out]

b*d*sqrt(abs(c))*arctan(x*sqrt(abs(c)))/c - 1/2*b*c*d*log(abs(x + 1/sqrt(abs(c))))/abs(c)^(3/2) + 1/2*b*d*sqrt
(abs(c))*log(abs(x - 1/sqrt(abs(c))))/c + 1/4*(b*c*x^2*e*log(-(c*x^2 + 1)/(c*x^2 - 1)) + 2*a*c*x^2*e + 2*b*c*d
*x*log(-(c*x^2 + 1)/(c*x^2 - 1)) + 4*a*c*d*x + b*e*log(c^2*x^4 - 1))/c

________________________________________________________________________________________

maple [A]  time = 0.03, size = 91, normalized size = 0.78 \[ \frac {a \,x^{2} e}{2}+a d x +\frac {b \arctanh \left (c \,x^{2}\right ) x^{2} e}{2}+b \arctanh \left (c \,x^{2}\right ) d x +\frac {b e \ln \left (c \,x^{2}+1\right )}{4 c}+\frac {b d \arctan \left (x \sqrt {c}\right )}{\sqrt {c}}+\frac {b e \ln \left (c \,x^{2}-1\right )}{4 c}-\frac {b d \arctanh \left (x \sqrt {c}\right )}{\sqrt {c}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)*(a+b*arctanh(c*x^2)),x)

[Out]

1/2*a*x^2*e+a*d*x+1/2*b*arctanh(c*x^2)*x^2*e+b*arctanh(c*x^2)*d*x+1/4*b*e/c*ln(c*x^2+1)+b*d*arctan(x*c^(1/2))/
c^(1/2)+1/4*b*e/c*ln(c*x^2-1)-b*d*arctanh(x*c^(1/2))/c^(1/2)

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 95, normalized size = 0.81 \[ \frac {1}{2} \, a e x^{2} + \frac {1}{2} \, {\left (c {\left (\frac {2 \, \arctan \left (\sqrt {c} x\right )}{c^{\frac {3}{2}}} + \frac {\log \left (\frac {c x - \sqrt {c}}{c x + \sqrt {c}}\right )}{c^{\frac {3}{2}}}\right )} + 2 \, x \operatorname {artanh}\left (c x^{2}\right )\right )} b d + a d x + \frac {{\left (2 \, c x^{2} \operatorname {artanh}\left (c x^{2}\right ) + \log \left (-c^{2} x^{4} + 1\right )\right )} b e}{4 \, c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*arctanh(c*x^2)),x, algorithm="maxima")

[Out]

1/2*a*e*x^2 + 1/2*(c*(2*arctan(sqrt(c)*x)/c^(3/2) + log((c*x - sqrt(c))/(c*x + sqrt(c)))/c^(3/2)) + 2*x*arctan
h(c*x^2))*b*d + a*d*x + 1/4*(2*c*x^2*arctanh(c*x^2) + log(-c^2*x^4 + 1))*b*e/c

________________________________________________________________________________________

mupad [B]  time = 1.31, size = 242, normalized size = 2.07 \[ a\,d\,x+\frac {a\,e\,x^2}{2}+\frac {b\,d\,x\,\ln \left (c\,x^2+1\right )}{2}-\frac {b\,d\,x\,\ln \left (1-c\,x^2\right )}{2}+\frac {b\,e\,\ln \left (c+x\,\sqrt {c^3}\right )}{4\,c}+\frac {b\,e\,\ln \left (c-x\,\sqrt {c^3}\right )}{4\,c}+\frac {b\,e\,x^2\,\ln \left (c\,x^2+1\right )}{4}-\frac {b\,e\,x^2\,\ln \left (1-c\,x^2\right )}{4}+\frac {b\,e\,\ln \left (c+x\,\sqrt {-c^3}\right )}{4\,c}+\frac {b\,e\,\ln \left (c-x\,\sqrt {-c^3}\right )}{4\,c}-\frac {b\,d\,\ln \left (c+x\,\sqrt {c^3}\right )\,\sqrt {c^3}}{2\,c^2}+\frac {b\,d\,\ln \left (c-x\,\sqrt {c^3}\right )\,\sqrt {c^3}}{2\,c^2}-\frac {b\,d\,\ln \left (c+x\,\sqrt {-c^3}\right )\,\sqrt {-c^3}}{2\,c^2}+\frac {b\,d\,\ln \left (c-x\,\sqrt {-c^3}\right )\,\sqrt {-c^3}}{2\,c^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*atanh(c*x^2))*(d + e*x),x)

[Out]

a*d*x + (a*e*x^2)/2 + (b*d*x*log(c*x^2 + 1))/2 - (b*d*x*log(1 - c*x^2))/2 + (b*e*log(c + x*(c^3)^(1/2)))/(4*c)
 + (b*e*log(c - x*(c^3)^(1/2)))/(4*c) + (b*e*x^2*log(c*x^2 + 1))/4 - (b*e*x^2*log(1 - c*x^2))/4 + (b*e*log(c +
 x*(-c^3)^(1/2)))/(4*c) + (b*e*log(c - x*(-c^3)^(1/2)))/(4*c) - (b*d*log(c + x*(c^3)^(1/2))*(c^3)^(1/2))/(2*c^
2) + (b*d*log(c - x*(c^3)^(1/2))*(c^3)^(1/2))/(2*c^2) - (b*d*log(c + x*(-c^3)^(1/2))*(-c^3)^(1/2))/(2*c^2) + (
b*d*log(c - x*(-c^3)^(1/2))*(-c^3)^(1/2))/(2*c^2)

________________________________________________________________________________________

sympy [A]  time = 10.48, size = 294, normalized size = 2.51 \[ \begin {cases} a d x + \frac {a e x^{2}}{2} + \frac {b c d \left (\frac {1}{c}\right )^{\frac {3}{2}} \log {\left (x + i \sqrt {\frac {1}{c}} \right )}}{4} - \frac {i b c d \left (\frac {1}{c}\right )^{\frac {3}{2}} \log {\left (x + i \sqrt {\frac {1}{c}} \right )}}{4} + b d x \operatorname {atanh}{\left (c x^{2} \right )} - \frac {b d \sqrt {\frac {1}{c}} \log {\left (x - i \sqrt {\frac {1}{c}} \right )}}{2} - \frac {i b d \sqrt {\frac {1}{c}} \log {\left (x - i \sqrt {\frac {1}{c}} \right )}}{2} - \frac {3 b d \sqrt {\frac {1}{c}} \log {\left (x + i \sqrt {\frac {1}{c}} \right )}}{4} + \frac {3 i b d \sqrt {\frac {1}{c}} \log {\left (x + i \sqrt {\frac {1}{c}} \right )}}{4} + b d \sqrt {\frac {1}{c}} \log {\left (x - \sqrt {\frac {1}{c}} \right )} + b d \sqrt {\frac {1}{c}} \operatorname {atanh}{\left (c x^{2} \right )} + \frac {b e x^{2} \operatorname {atanh}{\left (c x^{2} \right )}}{2} + \frac {b e \log {\left (x - i \sqrt {\frac {1}{c}} \right )}}{2 c} + \frac {b e \log {\left (x + i \sqrt {\frac {1}{c}} \right )}}{2 c} - \frac {b e \operatorname {atanh}{\left (c x^{2} \right )}}{2 c} & \text {for}\: c \neq 0 \\a \left (d x + \frac {e x^{2}}{2}\right ) & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*atanh(c*x**2)),x)

[Out]

Piecewise((a*d*x + a*e*x**2/2 + b*c*d*(1/c)**(3/2)*log(x + I*sqrt(1/c))/4 - I*b*c*d*(1/c)**(3/2)*log(x + I*sqr
t(1/c))/4 + b*d*x*atanh(c*x**2) - b*d*sqrt(1/c)*log(x - I*sqrt(1/c))/2 - I*b*d*sqrt(1/c)*log(x - I*sqrt(1/c))/
2 - 3*b*d*sqrt(1/c)*log(x + I*sqrt(1/c))/4 + 3*I*b*d*sqrt(1/c)*log(x + I*sqrt(1/c))/4 + b*d*sqrt(1/c)*log(x -
sqrt(1/c)) + b*d*sqrt(1/c)*atanh(c*x**2) + b*e*x**2*atanh(c*x**2)/2 + b*e*log(x - I*sqrt(1/c))/(2*c) + b*e*log
(x + I*sqrt(1/c))/(2*c) - b*e*atanh(c*x**2)/(2*c), Ne(c, 0)), (a*(d*x + e*x**2/2), True))

________________________________________________________________________________________